var submitForm = function($dialog,$grid,$pjq) {
	 var userNameVal=$("#userName").val();//用户名
	 var passwordVal=$("#password").val();//密码
		 
	 if($.trim(userNameVal)==""){$pjq.messager.alert("提示","用户名不能为空！","info"); return;}
	 if($.trim(passwordVal)==""){$pjq.messager.alert("提示","密码不能为空！","info"); return;} 
	 showProcess(true,$pjq);//显示进度条
	 $.post(base+"/user/checkUserName","userName="+userNameVal,function(data){
		 	if(data){
		 		showProcess(false,$pjq);
				$pjq.messager.alert("提示","该用户名已存在！","info");
			}else{
				 $.post(base+"/user/add",$("#form").serialize(),function(data){
					 showProcess(false,$pjq);	
					 if(data){
							$pjq.messager.alert("提示","提交成功！","info");
							$grid.datagrid("load");
							$dialog.dialog("destroy");
						}else{
							$pjq.messager.alert("提示","提交失败！","error");
						}
				},"json");
			}
	 },"json");
};
